<template>
  <div class="demo-title">search-bar/demo2</div>
  <div class="demo">
    <SearchBar v-model="val" @search="search()">
      <template #rightout>
        <span class="btn" @click="customSearch()">Search</span>
      </template>
    </SearchBar>
  </div>
</template>

<script lang="ts" setup>
  import { ref } from 'vue'
  import SearchBar from '@sscd-mobile/search-bar'
  const val = ref('')
  const search = () => console.log(val.value)
  const customSearch = () => console.log(val.value)
</script>

<style lang="less" scoped>
  .demo {
    height: 80px;
    padding-top: 12px;
    background-color: #fff;
    .btn {
      color: #1677ff;
    }
  }
</style>
